package com.hhs.storage.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hhs.storage.bean.BaseUser;
import com.hhs.storage.bean.InputParam;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author shadow
 * @since 2018-09-29
 */
public interface BaseUserService extends IService<BaseUser> {
    Map<String, Object> addOrUpdate(BaseUser user,String roleFlag);
    Map<String, Object> dele(String id);
    Map<String, Object> editRole(String userId, String[] roleArr);
    Map<String, Object> oauth(String account, String password);

    /**
     * 获取用户信息
     * @param id
     * @return
     */
    Map<String, Object> getInfo(String id);

    Map<String, Object> changePass(String userId, String password);
    Map<String, Object> changePass(String createrId, String oldPass, String newPass);
    Map<String, Object> changeStatus(BaseUser user);

    Map<String, Object> getAll(InputParam inputParam);
    Map<String, Object> getUsersByRoleFlag(@RequestParam String flag);
    public Map<String, Object> queryCarCaptain(InputParam inputParam);


    Map<String, Object> getAllById(String userId);

    //部门管理 为部门单独添加人员使用
    Map<String, Object> addToDepart(BaseUser user,String roleFlag,String departId,Integer employeeType);

    Map<String, Object> resetPass(String id);

    Map<String, Object> getByName(String name);

    int sum();

    /**
     * 获取用户的出勤率数据
     * @param a
     * @param inputParam
     */
    void doAbsenceAndAttendance(List<BaseUser> a,InputParam inputParam);

    Map<String, Object> getUsersByRoleIds(String roleIds);
}
